package com.jinlia.show.modules.wxapp.model.vo;

import com.jinlia.show.modules.base.model.po.ShoppingCartPO;
import lombok.Data;
import org.springframework.beans.BeanUtils;

@Data
public class ShoppingCartVO extends ShoppingCartPO {
    /**
     * 默认购物车为选中项
     */
    private Boolean checked = Boolean.TRUE;

    public static ShoppingCartVO fromEntity(ShoppingCartPO entity) {
        ShoppingCartVO goodsVO = new ShoppingCartVO();
        BeanUtils.copyProperties(entity, goodsVO);
        return goodsVO;
    }
}
